#include <hxcpp.h>

#ifndef INCLUDED_haxe_Public
#include <haxe/Public.h>
#endif
#ifndef INCLUDED_jax_JValue
#include <jax/JValue.h>
#endif
#ifndef INCLUDED_jax_lang_JField
#include <jax/lang/JField.h>
#endif
namespace jax{
namespace lang{

Void JField_obj::__construct(::String n,::String t,Dynamic __o_af)
{
Dynamic af = __o_af.Default(0);
{
	HX_SOURCE_POS("Source/jax/lang/JObject.hx",75)
	this->name = n;
	HX_SOURCE_POS("Source/jax/lang/JObject.hx",76)
	this->type = t;
	HX_SOURCE_POS("Source/jax/lang/JObject.hx",77)
	this->access_flags = af;
	HX_SOURCE_POS("Source/jax/lang/JObject.hx",78)
	this->value = ::jax::JValue_obj::_void_dyn();
}
;
	return null();
}

JField_obj::~JField_obj() { }

Dynamic JField_obj::__CreateEmpty() { return  new JField_obj; }
hx::ObjectPtr< JField_obj > JField_obj::__new(::String n,::String t,Dynamic __o_af)
{  hx::ObjectPtr< JField_obj > result = new JField_obj();
	result->__construct(n,t,__o_af);
	return result;}

Dynamic JField_obj::__Create(hx::DynamicArray inArgs)
{  hx::ObjectPtr< JField_obj > result = new JField_obj();
	result->__construct(inArgs[0],inArgs[1],inArgs[2]);
	return result;}

hx::Object *JField_obj::__ToInterface(const type_info &inType) {
	if (inType==typeid( ::haxe::Public_obj)) return operator ::haxe::Public_obj *();
	return super::__ToInterface(inType);
}


JField_obj::JField_obj()
{
}

void JField_obj::__Mark(HX_MARK_PARAMS)
{
	HX_MARK_BEGIN_CLASS(JField);
	HX_MARK_MEMBER_NAME(name,"name");
	HX_MARK_MEMBER_NAME(type,"type");
	HX_MARK_MEMBER_NAME(value,"value");
	HX_MARK_MEMBER_NAME(access_flags,"access_flags");
	HX_MARK_END_CLASS();
}

void JField_obj::__Visit(HX_VISIT_PARAMS)
{
	HX_VISIT_MEMBER_NAME(name,"name");
	HX_VISIT_MEMBER_NAME(type,"type");
	HX_VISIT_MEMBER_NAME(value,"value");
	HX_VISIT_MEMBER_NAME(access_flags,"access_flags");
}

Dynamic JField_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 4:
		if (HX_FIELD_EQ(inName,"name") ) { return name; }
		if (HX_FIELD_EQ(inName,"type") ) { return type; }
		break;
	case 5:
		if (HX_FIELD_EQ(inName,"value") ) { return value; }
		break;
	case 12:
		if (HX_FIELD_EQ(inName,"access_flags") ) { return access_flags; }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic JField_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	switch(inName.length) {
	case 4:
		if (HX_FIELD_EQ(inName,"name") ) { name=inValue.Cast< ::String >(); return inValue; }
		if (HX_FIELD_EQ(inName,"type") ) { type=inValue.Cast< ::String >(); return inValue; }
		break;
	case 5:
		if (HX_FIELD_EQ(inName,"value") ) { value=inValue.Cast< ::jax::JValue >(); return inValue; }
		break;
	case 12:
		if (HX_FIELD_EQ(inName,"access_flags") ) { access_flags=inValue.Cast< int >(); return inValue; }
	}
	return super::__SetField(inName,inValue,inCallProp);
}

void JField_obj::__GetFields(Array< ::String> &outFields)
{
	outFields->push(HX_CSTRING("name"));
	outFields->push(HX_CSTRING("type"));
	outFields->push(HX_CSTRING("value"));
	outFields->push(HX_CSTRING("access_flags"));
	super::__GetFields(outFields);
};

static ::String sStaticFields[] = {
	String(null()) };

static ::String sMemberFields[] = {
	HX_CSTRING("name"),
	HX_CSTRING("type"),
	HX_CSTRING("value"),
	HX_CSTRING("access_flags"),
	String(null()) };

static void sMarkStatics(HX_MARK_PARAMS) {
};

static void sVisitStatics(HX_VISIT_PARAMS) {
	HX_VISIT_MEMBER_NAME(JField_obj::__mClass,"__mClass");
};

Class JField_obj::__mClass;

void JField_obj::__register()
{
	Static(__mClass) = hx::RegisterClass(HX_CSTRING("jax.lang.JField"), hx::TCanCast< JField_obj> ,sStaticFields,sMemberFields,
	&__CreateEmpty, &__Create,
	&super::__SGetClass(), 0, sMarkStatics, sVisitStatics);
}

void JField_obj::__boot()
{
}

} // end namespace jax
} // end namespace lang
